package com.rabbitMq.testlate.listence;

import com.rabbitMq.testlate.config.RabbitMqConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
public class DlxListence {
    //这个原理就是可以采用ttl+死信队列进行构造下延迟队列，这样保证可以发送出来
    @RabbitListener(queues = RabbitMqConfig.DLX_QUEUE_VALUE)
    public void dlxQueueValue(String message){
        System.out.println(message);
    }
}
